/**
* 使用说明 
* 引入JS文件   http://api.weixinzjit.com/api/www/js/wx_jsapi_v_1.0.js
* 依赖于 jquery-1.10.2.min.js 
* 引入JS之前要引入 https://res.wx.qq.com/open/js/jweixin-1.0.0.js
* 初始化 ZJWX(微信APIList，微信回调函数，是否为debug模式)
* 例如	var ApiList = [ 'onMenuShareTimeline','onMenuShareAppMessage' ] ;
		var CallbackList = function(){
			wx.onMenuShareAppMessage({ ... });
		}
		ZJWX(ApiList,CallbackList,true);
*/
function ZJWX(ApiList,CallbackList,debug){
	var wx_debug = debug?debug:false;
	var url = 'http://api.weixinzjit.com//api.php/wx/get_JSAPI_Config'; 
	$.post(url,{callback:location.href},function(res){
		res = eval('('+res+')');
		var wxConf = {
			debug : wx_debug,
			appId: res.d.appid,
    		timestamp: res.d.timestamp,
    		nonceStr: res.d.noncestr,
   			signature: res.d.signature,
    		jsApiList:ApiList
		};
		wx.config(wxConf);
		wx.ready(function(){
			CallbackList();
		});
		
	});
}